
var obj = { name: 'zhang' };
console.log(Object.isExtensible(obj));// true
Object.preventExtensions(obj);  //  是否可以扩展
console.log(Object.isExtensible(obj)); // false

//Object.defineProperty(obj, 'age', {value: 10});//TypeError: Cannot define property age, object is not extensible
obj.age = 10;
console.log(obj.age); // undefined
obj.name = 'xiao'
console.log(obj.name)
delete  obj.name
console.log(obj.name)
